<?php

namespace App\Models\WorkOrder;

use App\Models\BaseModel;
use App\Models\Traits\KfSoftDeletes;
use App\Models\Traits\KfUid;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class WorkOrderMainV2Model extends BaseModel
{
    use HasFactory, KfSoftDeletes, KfUid;

    protected $table = 'work_order_main_v2';

    protected $fillable = [
        'workOrderNo',
        'shopId',
        'workOrderTypeId',
        'workflowTemplateId',
        'cruiseOrderId',
        'status',
        'handlerUserId',
        'completeTime',
        'createdAt',
        'createdByUid',
        'updatedAt',
        'updatedByUid',
        'isDeleted',
    ];

    /*
     * status
     */
    const STATUS_CLOSE   = 0;
    const STATUS_ONGOING = 1;
    const STATUS_FINISH  = 2;
    const STATUS_MAPPING = [
        self::STATUS_CLOSE   => '已关闭',
        self::STATUS_ONGOING => '进行中',
        self::STATUS_FINISH  => '已完成',
    ];

}
